Science and Engineering Projects Using the Arduino and Raspberry Pi by Paul Bradt & David Bradt

Science and Engineering Projects Using the Arduino and Raspberry Pi by Paul Bradt & David Bradt

Author:Paul Bradt & David Bradt
Language: eng
Format: epub
ISBN: 9781484258118
Publisher: Apress


rtc.update();

Wire.beginTransmission(DS1307_ADDRESS);

byte zero = 0x00;

Wire.write(zero);

Wire.endTransmission();

Wire.requestFrom(DS1307_ADDRESS, 7);

DateTime currentTime = RTC.now();

//Print the date like 3/1/1/11 23:59:59

sprintf(tempDate, "%02d/%02d/%02d %02d:%02d:%02d",

currentTime.month(), currentTime.day(),

currentTime.year(), currentTime.hour(),

currentTime.minute(), currentTime.second());

return String(tempDate);

}

Listing 6-2Arduino SN106 Combination of RTC and SD Card Shield Code



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.